@extends('admin.layouts')
@section('css')
    <link href="{{asset('assets/css/bootstrap.min.css')}}" rel="stylesheet" />
    <link rel="stylesheet" href="{{asset('assets/css/font-awesome.min.css')}}" />
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />

    <link rel="stylesheet" href="{{asset('assets/css/ace.min.css')}}" />
    <link rel="stylesheet" href="{{asset('assets/css/ace-rtl.min.css')}}" />
    <link rel="stylesheet" href="{{asset('assets/css/ace-skins.min.css')}}" />
    <script src="{{asset('assets/js/ace-extra.min.js')}}"></script>
@endsection
@section('content')

    <div class="main-content">
        <div class="breadcrumbs" id="breadcrumbs">
            <script type="text/javascript">
                try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
            </script>

            <ul class="breadcrumb">
                <li>
                    <i class="icon-home home-icon"></i>
                    <a href="#">首页</a>
                </li>
                <li class="active">网站设置</li>
            </ul><!-- .breadcrumb -->

            <div class="nav-search" id="nav-search">
                <form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
                </form>
            </div><!-- #nav-search -->
        </div>

        <div class="page-content">
            <div class="page-header">
                <h1>
                    网站设置
                </h1>
            </div><!-- /.page-header -->

            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->

                    <form class="form-horizontal" id="imgFormg6cfg" role="form" method="post" action="">

                        <div class="form-group">
                            <label class="col-sm-2 control-label no-padding-right" for="form-field-1title"> 网站标题 </label>

                            <div class="col-sm-10">
                                <input type="text" id="form-field-1title" name="title" placeholder="网站标题" class="col-xs-10 col-sm-7" value="{{$cfg['title']}}" />
                                <span class="help-inline col-xs-12 col-sm-7">
                                    {{--<span class="middle">必填</span>--}}
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label no-padding-right" for="form-field-1title"> 网站关键字 </label>

                            <div class="col-sm-10">
                                <input type="text" id="form-field-1title" name="keywords" placeholder="网站关键字" class="col-xs-10 col-sm-7"  value="{{$cfg['keywords']}}"/>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    {{--<span class="middle">必填</span>--}}
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label no-padding-right" for="form-field-1title"> 网站描述 </label>
                            <div class="col-sm-10">
                                <textarea name="describe" id="describe" cols="30" rows="10" class="col-xs-10 col-sm-7">{{$cfg['describe']}}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label no-padding-right" for="form-field-1title"> 网站备案信息 </label>
                            <div class="col-sm-10">
                                <textarea name="binfo" id="binfo" cols="30" rows="4" class="col-xs-10 col-sm-7">{{$cfg['binfo']}}</textarea>
                            </div>
                        </div>

                        <div class="space-4"></div>

                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    取消
                                </button>
                            </div>
                        </div>
                    </form>
                </div><!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->
        </div>
    </div>
    @endsection

@section('javascript')
    <script src='{{asset('assets/js/jquery-2.0.3.min.js')}}'></script>
    <script src="{{asset('assets/js/bootstrap.min.js')}}"></script>
    <script src="{{asset('assets/js/typeahead-bs2.min.js')}}"></script>

    <!-- ace scripts -->
    <script type="text/javascript" src="{{asset('assets/layer/layer.js')}}"></script>
    <script src="{{asset('assets/js/ace-elements.min.js')}}"></script>
    <script src="{{asset('assets/js/ace.min.js')}}"></script>
    <script type="text/javascript">
        $("#imgFormg6cfg").submit(function () {
            var data={'title':$('input[name="title"]').val(),'keywords':$('input[name="keywords"]').val(),'binfo':$("#binfo").val(),'describe':$('#describe').val(),'_token':'{{csrf_token()}}'};
            $.post('',data, function (res) {
                layer.msg(res.msg);
            });
            return false;
        });
    </script>
    @endsection